package com.novax.ex.activity.open.api;

import com.novax.ex.common.results.ReturnResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * description: 前台 排名赛规则查询
 *
 * @author shaw
 * @date 11/30/22 11:14
 */
@Tag(name = "前台-排名赛规则", description = "前台-排名赛规则")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "RankRuleApi", contextId = "RankRuleApi")
public interface RankRuleApi {

    // 主活动规则查询
    @Operation(summary = "主活动查询活动配置的规则")
    @GetMapping(value = "/v3/public/rank/rules/{rankId}")
    ReturnResult<String> rule(@RequestHeader("language") String language,
                              @PathVariable Long rankId);

    // 子活动规则查询
    @Operation(summary = "子活动查询活动配置的规则")
    @GetMapping(value = "/v3/public/rank-sub/rules/{rankSubId}")
    ReturnResult<String> subRule(@RequestHeader("language") String language,
                                 @PathVariable Long rankSubId);

}